using System;
using TeamCommunitySolution.Domain.DataLayer.Base;

namespace TeamCommunitySolution.Services.Repositories
{
    /// <summary>
    /// Repository interface for the team.
    /// </summary>
    public interface ITeamRepository
    {
        /// <summary>
        /// Gets the team.
        /// </summary>
        /// <param name="id">The team id.</param>
        /// <returns>Instance of the team.</returns>
        Team GetTeam(string id);

        /// <summary>
        /// Saves the team.
        /// </summary>
        /// <param name="team">The team object.</param>
        void SaveTeam(Team team);

        /// <summary>
        /// Gets the team request by id.
        /// </summary>
        /// <param name="id">The request id.</param>
        /// <returns>The team request instance.</returns>
        TeamInvite GetTeamRequestById(string id);

        /// <summary>
        /// Gets the team by field.
        /// </summary>
        /// <param name="field">The field.</param>
        /// <param name="fieldValue">The field value.</param>
        /// <returns>Team instance.</returns>
        Team GetTeamByField(string field, string fieldValue);
    }
}